
<%@ page import="com.jkt.rms.commons.includes.*"%>
<%@ page import="java.util.*"%>
<%@ page import="com.jkt.rms.business.*"%>
<%@ include file="/WEB-INF/jsp/include.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="/spring"%>


<html>
<head>
<title><fmt:message key="lbl.title.createVendor" /></title>
</head>
<body>
<center>
<h2 id="headerbar"><fmt:message key="lbl.title.createVendor" /></h2>
<div id="content">
<table width="90%" cellpadding="0" cellspacing="0">
<c:if test="${ not empty errors.allErrors}">
		<tr valign="top" align="left">
			<td width="80%">
			<div id="errorFieldSet">
			<fieldset><legend><strong>Errors</strong></legend>
			<table width="80%" border="1" cellpadding="0" cellspacing="0">
				<c:forEach var="err" items="${errors.allErrors}">
					<spring:message code="${err.code}" arguments="${err.arguments}" />
					<br />
				</c:forEach>
				<tr>
				</tr>
			</table>
			</fieldset>
			</div>
			</td>
		</tr>
	</c:if>
<c:if test="${ not empty vendorData.message}">
		<tr valign="top" align="left">
			<td width="80%">
			<div id="infoFieldSet">
			<fieldset><legend><strong>Messages</strong></legend>
			<table width="80%" border="1" cellpadding="0" cellspacing="0">
				<spring:message code="${vendorData.message}" />

			</table>
			</fieldset>
			</div>
			</td>
		</tr>
	</c:if>

	<tr valign="top" align="center">
		<td width="80%">
		<fieldset><legend><strong>Search Vendor</strong></legend>
		<form:form method="POST" commandName="vendorData" name="vendorData"
			action="vendorlist.htm?method=searchVendor" >
			<table width="80%" cellpadding="0" cellspacing="0">
				<tr>
					<td align='right'><label for="textVendorName">Vendor
					Name:</label></td>
					<td align='center'><form:input path="searchVendorName"
						maxlength="100" tabindex="1" /></td>
					<td align='right' class=header><label for="textVendorCode">Vendor
					Code:</label></td>
					<td align='center' class=value><form:input path="searchVendorCode"
						maxlength="8" tabindex="2" /></td>
				</tr>
				<tr>
					<td valign="bottom" colspan="1"><input type="submit"
						name='searchButton' value="Search" tabindex="3"/> <br>
					<input type="button" name='findAllButton' value="Find All" tabindex="4"
						onclick="dosubmit('vendorData','vendorlist.htm?method=findAllVendor')" /></td>
				</tr>
			</table></fieldset>
		</td>
		<c:if test="${not empty searchResult}">
			<tr valign="top" align="center">
				<td width="80%">
				<div id="vendorSearch">
				<fieldset><legend><strong>VendorSearch</strong></legend>
				<table width="80%" cellpadding="0" cellspacing="0">
					<tr bgcolor="#AAAAAA">
						<td>Vendor Code</td>
						<td>Vendor Name</td>
						<td>Blended Rate Offshore</td>
						<td>Blended Rate Onsite</td>
						<td>Status</td>
						<td>Edit</td>
					</tr>
					<c:forEach var="vo" items="${searchResult}">
						<tr>
							<td>${vo.vendorCode}</td>
							<td>${vo.vendorName}</td>
							<td>${vo.offshoreBlendedRate}</td>
							<td>${vo.onsiteBlendedRate}</td>
							<td>${vo.status}</td>
							<td><a
								href='vendorlist.htm?method=loadEditVendor&vendorName=${vo.vendorName}&searchVendorName=<c:out value="${vendorData.searchVendorName}"/>&searchVendorCode=<c:out value="${vendorData.searchVendorCode}"/>&searchMethod=<c:out value="${vendorData.searchMethod}"/>' >
							Edit </a></td>
						</tr>
					</c:forEach>
				</table>
				</fieldset>
				</div>
		</c:if>
		</form:form>	
	</tr>
	<tr valign="top" align="center">
		<td width="70%">
		<fieldset><legend><strong>Add Vendor</strong></legend> 
		<form:form method="POST" commandName="vendorData" name="addvendor"
			action="vendorlist.htm?method=addVendor">
			<table border="0" width="80%">
				<tr>
						<td align='right'><label for="textVendorName">Vendor
						Name:<font color="red">*</font></label></td>
						<td align='center'><form:input path="vendorName"
							maxlength="100" tabindex="5" title="vendorName" /></td>
						<td align='right' class=header><label for="textVendorCode">Vendor
						Code:<font color="red">*</font></label></td>
						<td align='center' class=value><form:input path="vendorCode"
							maxlength="8" tabindex="6" /></td>
					</tr>
					<tr>
						<td align='right'><label for="textAddressLine1">Address
						Line 1:<font color="red">*</font></label></td>
						<td align='center'><form:input path="addressLine1"
							maxlength="100" tabindex="7" title="addressLine1" /></td>

						<td align='right' class=header><label for="AddressLine2">Address
						Line 2:</label></td>
						<td align='center' class=value><form:input
							path="addressLine2" maxlength="100" tabindex="8" /></td>
					</tr>

					<tr>
						<td align='right'><label for="textTown">Town/City:<font color="red">*</font></label></td>
						<td align='center'><form:input path="town" maxlength="100"
							tabindex="9" title="town" /></td>

						<td align='right' class=header><label for="textState">State/County:<font color="red">*</font></label></td>
						<td align='center' class=value><form:input path="county"
							maxlength="100" tabindex="10" /></td>
					</tr>

					<tr>
						<td align='right'><label for="textCountry">Country:<font color="red">*</font></label></td>
						<td align='center'><form:input path="country" maxlength="100"
							tabindex="11" title="country" /></td>

						<td align='right' class=header><label for="textPostcode">Zip/Postcode</label></td>
						<td align='center' class=value><form:input path="postcode"
							maxlength="50" tabindex="12" /></td>
					</tr>

					<tr>
						<td align='right'><label for="textContactNo">Contact
						No:<font color="red">*</font></label></td>
						<td align='center'><form:input path="contactNo"
							maxlength="20" tabindex="13" title="EcontactNo" /></td>

						<td align='right' class=header><label for="textEmail">Email:<font color="red">*</font></label></td>
						<td align='center' class=value><form:input path="email"
							maxlength="100" tabindex="14" /></td>
					</tr>

					<tr>
						<td align='right'><label for="textOffshoreBlendedRate">Off
						Shore Blended Rate </label></td>
						<td align='center'><form:input path="offshoreBlendedRate"
							maxlength="8" tabindex="15" title="offshoreBlendedRate" /></td>

						<td align='right' class=header><label
							for="textOnsiteBlendedRate">On Site Blended Rate</label></td>
						<td align='center' class=value><form:input
							path="onsiteBlendedRate" maxlength="8" tabindex="16" /></td>
					</tr>
					<tr>
						<td align='right'><label
							for="textOffshoreContactPersonDetails">OffShore Contact
						Person Details</label></td>
						<td align='right'><label
							for="textOnsiteContactPersonDetails">OnSite Contact
						Person Details</label></td>
					</tr>
					<tr>
						<td align='right' class=header><label for="textOffshoreName">Name:<font color="red">*</font></label></td>
						<td align='center' class=value><form:input
							path="offshorePersonName" maxlength="50" tabindex="17" /></td>
						<td align='right' class=header><label for="textOnsiteName">Name:<font color="red">*</font></label></td>
						<td align='center' class=value><form:input
							path="onsitePersonName" maxlength="50" tabindex="	26" /></td>
					</tr>
					<tr>
						<td align='right'><label for="textAddressLine1">Address
						Line 1 </label></td>
						<td align='center'><form:input path="offshoreAddressLine1"
							maxlength="100" tabindex="18" title="Address Line 1" /></td>

						<td align='right' class=header><label for="textAddressLine1">Address
						Line 1</label></td>
						<td align='center' class=value><form:input
							path="onsiteAddressLine1" maxlength="100" tabindex="27" /></td>
					</tr>

					<tr>
						<td align='right'><label for="textAddressLine2">Address
						Line 2 </label></td>
						<td align='center'><form:input path="offshoreAddressLine2"
							maxlength="100" tabindex="19" title="Address Line2 " /></td>

						<td align='right' class=header><label for="textAddressLine2">Address
						Line 2</label></td>
						<td align='center' class=value><form:input
							path="onsiteAddressLine2" maxlength="100" tabindex="28" /></td>
					</tr>

					<tr>
						<td align='right'><label for="textTown">Town/City:<font color="red">*</font></label></td>
						<td align='center'><form:input path="offshoreTown"
							maxlength="100" tabindex="20" title="Town" /></td>
						<td align='right' class=header><label for="textTown">
						Town/City:<font color="red">*</font></label></td>
						<td align='center' class=value><form:input path="onsiteTown"
							maxlength="100" tabindex="29" /></td>
					</tr>

					<tr>
						<td align='right'><label for="textCounty">State/County:<font color="red">*</font></label></td>
						<td align='center'><form:input path="offshoreCounty"
							maxlength="100" tabindex="21" title="State" /></td>
						<td align='right' class=header><label for="textCounty">State/County:<font color="red">*</font>
						</label></td>
						<td align='center' class=value><form:input
							path="onsiteCounty" maxlength="100" tabindex="30" /></td>
					</tr>

					<tr>
						<td align='right'><label for="textCountry">Country:<font color="red">*</font></label></td>
						<td align='center'><form:input path="offshoreCountry"
							maxlength="100" tabindex="22" title="Country" /></td>
						<td align='right' class=header><label for="textCountry">Country:<font color="red">*</font></label></td>
						<td align='center' class=value><form:input
							path="onsiteCountry" maxlength="100" tabindex="31" /></td>
					</tr>

					<tr>
						<td align='right'><label for="textPostcode">Zip/Postcode
						</label></td>
						<td align='center'><form:input path="offshorePostCode"
							maxlength="50" tabindex="23" title="Zip" /></td>
						<td align='right' class=header><label for="textPostcode">Zip/Postcode</label></td>
						<td align='center' class=value><form:input
							path="onsitePostCode" maxlength="50" tabindex="32" /></td>
					</tr>

					<tr>
						<td align='right'><label for="textContactNo">Contact
						No:<font color="red">*</font></label></td>
						<td align='center'><form:input path="offshoreContactNo"
							maxlength="20" tabindex="24" title="Contact No" /></td>
						<td align='right' class=header><label for="textContactNo">Contact
						No:<font color="red">*</font></label></td>
						<td align='center' class=value><form:input
							path="onsiteContactNo" maxlength="20" tabindex="33" /></td>
					</tr>

					<tr>
						<td align='right'><label for="textEmail"> Email:<font color="red">*</font></label></td>
						<td align='center'><form:input path="offshoreEmail"
							maxlength="100" tabindex="25" title="Email" /></td>

						<td align='right' class=header><label for="textEmail">Email:<font color="red">*</font></label></td>
						<td align='center' class=value><form:input path="onsiteEmail"
							maxlength="100" tabindex="34" /></td>
					</tr>

					<tr>
						<td align='right'><label for="textComments">
						Comment:</label></td>
						<td align="center"><form:textarea path="comments" rows="4" cols="20" tabindex="35" title="Comments"/></td>
						<tr>
							<td colspan="4" align="center"><input class="value"
								type='submit' name='button' value='Add' tabindex="36" title="">
							</td>
						</tr>

						<tr>
							<td colspan="4" align="center">&nbsp;</td>
						</tr>
			</table></fieldset>
		</td>
	</tr>
</table>

</form:form>
</div>
</center>
<center><%@ include file="footer.jsp"%></center>
</body>
</html>
